#include<iostream>
#include<cmath>
#include<cstdlib>
#include<iomanip>
#include<fstream>
#include<sstream>
#include<string>

using namespace std; 
      
int main (int argc , char * argv [])
{
int nx=83;
int ny=83;
int nz=10;
int rad_geo=40;
int rad[12]={5,8,11,14,17,20,23,26,29,32,35,38};
ostringstream name;

for (int ks=1;ks<13;ks++)
{

	name.str("");
	name<<"phase"<<ks<<".dat";
	ofstream out;
	out.open(name.str().c_str());

	for(int k=0 ; k<nz; k++)						///*********
		for(int j=0 ; j<ny; j++)					///*********
			for(int i=0 ; i<nx; i++)
			if (sqrt((i-nx/2)*(i-nx/2)+(j-ny/2)*(j-ny/2))<=rad[ks-1])
			out<<1<<endl;
			else
			out<<-1<<endl;
	out.close();


	





	
}


	name.str("");
	name<<"val_cap1.dat";
	ofstream out;
	out.open(name.str().c_str());

	
	for(int k=0 ; k<nz; k++)						///*********
		for(int j=0 ; j<ny; j++)					///*********
			for(int i=0 ; i<nx; i++)
			if (sqrt((i-nx/2)*(i-nx/2)+(j-ny/2)*(j-ny/2))<=rad_geo)
			out<<0<<endl;
			else
			out<<1<<endl;
	out.close();

}
